﻿
using Flatland.Elements;

namespace Flatland.Labs {
    /// <summary>
    /// FlatlandLab for training food finding.
    /// </summary>
    class FoodLab : FlatlandLab {

        /// <summary>
        /// Test food to be distributed in the environment. Useful for calculating the fitness value in the Agent.
        /// </summary>
        public const int AMOUNT_OF__TEST_FOOD = 30;

        public FoodLab(GeneticProgramming.GP gp, int individualEvaluationTime = DEFAULT_EVALUATION_TIME)
            : base(gp, individualEvaluationTime) {

        }

        protected override void ResetEnvironment() {
            Agent.FoodEaten = 0;
            Flatland.RemoveFood();
            Flatland.FoodReserve = Food.SetupFood(Flatland, false, AMOUNT_OF__TEST_FOOD, 10f);
        }
    }
}
